object transcriptTest {

  def main(args: Array[String]): Unit = {

    val fruit: List[String] = List("apples", "oranges", "pears")
    val nums: List[Int] = List(1, 2, 3, 4)
    val diag3: List[List[Int]] =
      List(
        List(1, 0, 0),
        List(0, 1, 0),
        List(0, 0, 1)
      )
    val empty: List[Nothing] = List()

    val List(a, b, c) = fruit

    List(a, b, c).foreach(str => println(if (str == "oranges") str))


    val lists = List(1, 2) ::: List(3, 4, 5)

    println(lists.mkString("[", ",", "]"))

    println(lists.length)
    println(lists.max)

    println(lists.splitAt(2)._1.mkString("[", ",", "]"))
    println(lists.splitAt(2)._2.mkString("[", ",", "]"))

    val abcde = List('a', 'b', 'c', 'd', 'e')

    println(abcde.filter(_ % 2 == 0).mkString("[", ",", "]"))

    println(abcde zip List(1, 2, 3, 3))

    val buf = new StringBuilder
    println(abcde addString(buf, ""))

    var sum = 0

    for (i <- Range.apply(1, 100) map (x => x * 3) filter (_ % 2 == 0)) {
      println(i)
      sum += 1
    }

    println(s"sum ==> $sum")
  }

}
